import java.io.File;
import java.io.IOException;

/**
 * Creat by TanLei
 * Description:
 * User:86183
 * Date:2022-06-16
 * Time:13:51
 */
public class Test3 {
    public static void main(String[] args) throws IOException {
        File file = new File("C:/Users/86183/Desktop/test/teklfsda.txt");
        System.out.println(file.getParent());
        System.out.println(file.getName());
        System.out.println(file.getPath());
        System.out.println(file.getAbsoluteFile());
        System.out.println(file.getCanonicalFile());
        System.out.println("======================================");
        File file1 = new File("./test20220621.txt");
        file1.createNewFile();
        System.out.println(file1.getParent());
        System.out.println(file1.getName());
        System.out.println(file1.getPath());
        System.out.println(file1.getAbsoluteFile());
        System.out.println(file1.getCanonicalFile());
    }
}
